package chuishop.yiqimaicai.service.Impl;

import chuishop.yiqimaicai.mapper.HouseInfoMapper;
import chuishop.yiqimaicai.pojo.Addgoods_body;
import chuishop.yiqimaicai.pojo.Addgoods_header;
import chuishop.yiqimaicai.pojo.GoodsHouse;
import chuishop.yiqimaicai.pojo.HouseInfo;
import chuishop.yiqimaicai.service.HouseInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HouseInfoServiceImpl implements HouseInfoService {

    @Autowired
    private HouseInfoMapper houseInfoMapper;
    @Override
    public List<HouseInfo> findAllHouseInfo() {
        return houseInfoMapper.findAllHouseInfo();
    }

    @Override
    public boolean addHouseInfo(HouseInfo houseInfo) {
        return houseInfoMapper.addHouseInfo(houseInfo)>0;
    }

    @Override
    public boolean delHouseInfo(String[] ids) {
        return houseInfoMapper.delHouseInfo(ids)>0;
    }

    @Override
    public boolean updataHouseInfo(HouseInfo houseInfo) {
        return houseInfoMapper.updataHouseInfo(houseInfo)>0;
    }

    @Override
    public List<HouseInfo> findHouseInfoBygname(String gname) {
        return houseInfoMapper.findHouseInfoBygname(gname);
    }

    @Override
    public List<Addgoods_body> getAddgoodsbodyId() {
        return houseInfoMapper.getAddgoodsbodyId();
    }

    @Override
    public List<GoodsHouse> getGoodsHouseid() {
        return houseInfoMapper.getGoodsHouseid();
    }

    @Override
    public List<Addgoods_header> getAddgoodsheadersid() {
        return houseInfoMapper.getAddgoodsheadersid();
    }
}
